<div class="form">
<?php
Yii::app()->clientScript->registerScript('RUN1', "
$('#Familiar_0_run').Rut({
   on_error: function(){ $('#Familiar_0_run').val(''); alert('El rut ingresado es incorrecto'); }
})
");?>

	<p class="note">
		Los campos con <span class="required">*</span> son obligatorios.
	</p>
	
	

    <?php echo $form->errorSummary($familiar); ?>
	
    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]nombres'); ?>
        <?php echo $form->TextField($familiar,'[0]nombres'); ?>
        <?php echo $form->error($familiar,'[0]nombres'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]apellido_paterno'); ?>
        <?php echo $form->TextField($familiar,'[0]apellido_paterno'); ?>
        <?php echo $form->error($familiar,'[0]apellido_paterno'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]apellido_materno'); ?>
        <?php echo $form->TextField($familiar,'[0]apellido_materno'); ?>
        <?php echo $form->error($familiar,'[0]apellido_materno'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]direccion'); ?>
        <?php echo $form->TextField($familiar,'[0]direccion'); ?>
        <?php echo $form->error($familiar,'[0]direccion'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]telefono'); ?>
        <?php echo $form->TextField($familiar,'[0]telefono'); ?>
        <?php echo $form->error($familiar,'[0]telefono'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]run'); ?>
        <?php echo $form->textField($familiar,'[0]run',array('maxlength'=>12));?>
        <?php echo $form->error($familiar,'[0]run'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]nivel_estudios'); ?>
        <?php echo $form->TextField($familiar,'[0]nivel_estudios'); ?>
        <?php echo $form->error($familiar,'[0]nivel_estudios'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]actividad'); ?>
        <?php echo $form->TextField($familiar,'[0]actividad'); ?>
        <?php echo $form->error($familiar,'[0]actividad'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]parentezco'); ?>
        <?php echo $form->TextField($familiar,'[0]parentezco',array('value'=>'Padre')); ?>
        <?php echo $form->error($familiar,'[0]parentezco'); ?>
    </div>
    
     <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]sexo'); ?>
        <?php echo CHtml::textField('sexo','Masculino',array('disabled'=>true)); ?>
        <?php echo $form->hiddenField($familiar,'[0]sexo',array('value'=>'M')); ?>
        <?php echo $form->error($familiar,'[0]sexo'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]email'); ?>
        <?php echo $form->TextField($familiar,'[0]email'); ?>
        <?php echo $form->error($familiar,'[0]email'); ?>
    </div>

    <div class="row">
        <?php echo $form->LabelEx($familiar,'[0]apoderado'); ?>
      	<?php echo $form->DropDownList($familiar,'[0]apoderado',array(1=>"Si",0=>"No")); ?>
        <?php echo $form->error($familiar,'[0]apoderado'); ?>
    </div>
</div>
<!-- form -->
